

'use strict'

let pool = require('../pool.js')
class feedback{
    constructor(){
        this.param = '/'
    }


    async post(c){
        c.setHeader('content-type', 'text/html; charset=utf-8')
        
        let a = c.service.fun
        let {user_id,feedback_txt,feedback_tel} = JSON.parse(c.body)
        
        await a.add('feedback_list',{'feedback_user_id':`${user_id}`,'feedback_txt':`${feedback_txt}`,'feedback_tel':`${feedback_tel}`},c.service.pool)
        c.send({msg:'success'});

    }
}

module.exports = feedback
